package cn.edu.wynu.oop.classdef.game;

public class Hero {
    String name; // 姓名
    String job; // 职业
    int attack; // 攻击力
    String dialog; // 台词

    void move(String direction, int distance) {
        System.out.println("%s向%s移动了%d米".formatted(name, direction, distance));
    }

    void attack() {  // 平A
        System.out.println("%s进行了%d点攻击".formatted(name, attack));
    }

    void showTime() {
        System.out.println("%s的台词是：%s".formatted(name, dialog));
    }

    public Hero() {
    }

    public Hero(String name, String job, int attack, String dialog) {
        this.name = name;
        this.job = job;
        this.attack = attack;
        this.dialog = dialog;
    }
}
